package org.example.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * ClassName: Hello06Controller
 * Package: org.example.springmvc.controller
 * Description:
 *
 * @Author wanghao
 * @Create 2024-07-11 17:13
 * @Version 1.0
 */
@Controller
@RequestMapping("/hello06")
public class Hello06Controller {

    // 演示服务器内部转发
    @RequestMapping("/h01")
    public String h01() {
        System.out.println("服务器转发...");
        return "forward:/outter.html";
    }

    // 演示客户端重定向
    @RequestMapping("/h02")
    public String h02() {
        System.out.println("客户端重定向...");
        return "redirect:/outter.html";
    }

}
